/**
 * Created by dean on 2018/5/25.
 */
import { fetch, post, jsonpost } from '../util/http'
//新人入职登陆
export const newEntry = params => { return post(`/api/hr/hirePerson/entry`, params).then(res => res); };

//转正类型
export const getPrcType = params => { return fetch(`/api/hr/sysdict/getPrcType`, params).then(res => res); };

//字典信息
export const getDicItem = params => { return fetch(`/api/hr/sysdict/getAll`, params).then(res => res); };

//调整岗位列表
export const getJobDicItem = params => { return fetch(`/api/hr/sysdict/getJoblist`, params).then(res => res); };

//录入入公司前工作经历信息
export const saveWork = params => { return post(`/api/hr/hireExpWork/save`, params).then(res => res); };
//删除入公司前工作经历信息
export const delWork = params => { return post(`/api/hr/hireExpWork/del`, params).then(res => res); };

//录入教育信息
export const saveEducation = params => { return post(`/api/hr/hireEducat/save`, params).then(res => res); };
//删除教育信息
export const delEducation = params => { return post(`/api/hr/hireEducat/del`, params).then(res => res); };

//录入培训经历
export const saveTraining = params => { return post(`/api/hr/hireTrain/save`, params).then(res => res); };
//删除培训经历
export const delTraining = params => { return post(`/api/hr/hireTrain/del`, params).then(res => res); };

//录入资格证书
export const saveQualification = params => { return post(`/api/hr/hireZcgl/save`, params).then(res => res); };
//删除资格证书
export const delQualification = params => { return post(`/api/hr/hireZcgl/del`, params).then(res => res); };

//录入语言能力
export const saveLan = params => { return post(`/api/hr/hireLan/save`, params).then(res => res); };
//删除语言能力
export const delLan = params => { return post(`/api/hr/hireLan/del`, params).then(res => res); };

//录入计算机能力
export const saveComputer = params => { return post(`/api/hr/hireItTech/save`, params).then(res => res); };
//删除计算机能力
export const delComputer = params => { return post(`/api/hr/hireItTech/del`, params).then(res => res); };

//录入奖惩类别
export const saveRewards = params => { return post(`/api/hr/hireJcxx/save`, params).then(res => res); };
//删除奖惩类别
export const delRewards = params => { return post(`/api/hr/hireJcxx/del`, params).then(res => res); };

//获取用户基本信息
export const getBasicInfo = params => { return fetch(`/api/hr/personalData/getBaseInfo`,params).then(res => res); };
//获取用户身份证
export const getNationalId = params => { return fetch(`/api/hr/personalData/getNationalId`,params).then(res => res); };


//录入亲属信息
export const saveFamily = params => { return post(`/api/hr/hireFamily/save`, params).then(res => res); };
//删除亲属信息
export const delFamily = params => { return post(`/api/hr/hireFamily/del`, params).then(res => res); };

//我的下属页面获取用户基本信息
export const getSubBasicInfo = params => { return fetch(`/api/hr/jobCurr/getOne`,params).then(res => res); };

//我的下属页面获取下属信息
export const getMySubBasicInfo = params => { return fetch(`/api/hr/jobCurr/getUnderLine`,params).then(res => res); };

//获取教育经历
export const getEdu = params => { return fetch(`/api/hr/hireEducat/getAll`, params).then(res => res); };

//获取工作经历
export const getExwork = params => { return fetch(`/api/hr/hireExpWork/getAll`, params).then(res => res); };

//获取培训经历
export const getTrain = params => { return fetch(`/api/hr/hireTrain/getAll`, params).then(res => res); };

//获取语言能力
export const getLan = params => { return fetch(`/api/hr/hireLan/getAll`, params).then(res => res); };

//获取计算机能力
export const getPcAb = params => { return fetch(`/api/hr/hireItTech/getAll`, params).then(res => res); };

//获取奖惩情况
export const getjc = params => { return fetch(`/api/hr/hireJcxx/getAll`, params).then(res => res); };

//获取亲属信息
export const getFam = params => { return fetch(`/api/hr/hireFamily/getAll`, params).then(res => res); };

//获取紧急联系人
export const getTacp = params => { return fetch(`/api/hr/hireTactPer/getOne`, params).then(res => res); };

//银行账号信息
export const getBnkacc = params => { return fetch(`/api/hr/hireBankacct/getOne`, params).then(res => res); };
//获取档案信息
export const getOutf = params => { return fetch(`/api/hr/hireOutf/getOne`, params).then(res => res); };
//获取竞业协议
export const getJyxy = params => { return fetch(`/api/hr/hireJyxy/getOne`, params).then(res => res); };

//资格证书
export const getzgzs = params => { return fetch(`/api/hr/hireZcgl/getAll`, params).then(res => res); };

//社保公积金
export const getsbg = params => { return fetch(`/api/hr/hireSi/getAll`, params).then(res => res); };

//保存基本信息
export const saveBsinfo = params => { return post(`/api/hr/hirePerson/save`, params).then(res => res); };

//保存基本信息
export const saveConcatInfo = params => { return post(`/api/hr/hirePerson/saveConcatInfo`, params).then(res => res); };

//保存档案信息
export const saveOutf = params => { return post(`/api/hr/hireOutf/save`, params).then(res => res); };
//保存竞业协议
export const saveJyxy = params => { return post(`/api/hr/hireJyxy/save`, params).then(res => res); };


//查询国家
export const getCountry = () => { return fetch(`/api/hr/countryTbl/getAll`).then(res => res); };

//查询民族
export const getNation = () => { return fetch(`/api/hr/ethnicGrpTbl/getAll`).then(res => res); };

//查询学校
export const getSchools = () => { return fetch(`/api/hr/school/getAll`).then(res => res); };

//查询证件类型
export const getIdType = () => { return fetch(`/api/hr/nidType1Vw/getAll`).then(res => res); };

//查询银行
export const getBank = () => { return fetch(`/api/hr/bankEcTbl/getAll`).then(res => res); };

//离职补偿金
export const getCompensate = params => { return fetch(`/api/hr/wfDmcHdr/getDmcInfo`, params).then(res => res); };

//审批流程图
export const getCompensateProcess = params => { return fetch(`/api/hr/process/processMap`, params).then(res => res); };

//已处理记录
export const getProcessedNode = params => { return fetch(`/api/hr/process/processedNode`, params).then(res => res); }

// 通用审批
export const getCompensateApprove = params => { return post(`/api/hr/process/approve`, params).then(res => res); };

//保存紧急联系人
export const saveEmergent = params => { return post(`/api/hr/hireTactPer/save`, params).then(res => res); };

//保存银行
export const saveBank = params => { return post(`/api/hr/hireBankacct/save`, params).then(res => res); };

//保存转正审批
export const saveFormalInfo = params => { return jsonpost(`/api/hr/wfprchdr/saveWfPrcHdr`, params).then(res => res); };

//转正审批
export const getFormal = params => { return fetch(`/api/hr/wfprchdr/getWfPrcHdr`, params).then(res => res); };

//转正流程审批
export const getFormalApprove = params => { return post(`/api/hr/wfprchdr/savePrc`, params).then(res => res); };

//调动审批
export const approveMobilize = params => { return post(`/api/hr/wfXfrHdr/saveXfr`, params).then(res => res); };
//离职审批
export const getWastage = params => { return fetch(`/api/hr/wfterhdr/getWfTerHdr`, params).then(res => res); };

//离职流程审批
export const getWastageApprove = params => { return post(`/api/hr/wfterhdr/saveTer`, params).then(res => res); };

//离职原因字典
export const getWastageReason = params => { return fetch(`/api/hr/sysdict/getActionResons`, params).then(res => res); };

//离职详细原因字典
export const getWastageDetailReason = params => { return fetch(`/api/hr/sysdict/getTerDetail`, params).then(res => res); };

//扫码信息获取
export const getQrmsg = params => { return fetch(`/api/hr/hirePerson/getOne`, params).then(res => res); };

//保存社保信息
export const saveSocial = params => { return post(`/api/hr/hireSi/save`, params).then(res => res); };

//解除劳动合同审批
export const getDissolution = params => { return fetch(`/api/hr/wfTlcHdr/getTlcInfo`, params).then(res => res); };

//工作调动审批
export const getMobilization = params => { return fetch(`/api/hr/wfXfrHdr/getXfrInfo`, params).then(res => res); };

//工作移交审批
export const getHandover = params => { return fetch(`/api/hr/wfTolHdr/getTolInfo`, params).then(res => res); };

//待办事项列表(待审批)
export const getTodoList = params => { return fetch(`/api/hr/process/getTODOlist`, params).then(res => res); };

//待办事项列表(已审批)
export const getDoneList = params => { return fetch(`/api/hr/process/getApprovedlist`, params).then(res => res); };

//我的申请列表
export const getMyApplication = params => { return fetch(`/api/hr/process/getMyApply`, params).then(res => res); };

//加签人员列表
export const getVisa = params => { return fetch(`/api/hr/wfPersonVw/getAll`, params).then(res => res); };

//个人信息修改审批
export const getProcessPerson = params => { return fetch(`/api/hr/modPers/getProcessPerson`, params).then(res => res); };

//获取流水号
export const getTrsNum = () => { return fetch(`/api/hr/process/getTransNum`).then(res => res); };

//获取个人基本信息
export const getBasicUser = params => { return fetch(`/api/hr/personalData/getOne`,params).then(res => res); };

//获取个人基本信息详情
export const getBasicUserDetail = params => { return fetch(`/api/hr/personalData/getOneDetail`,params).then(res => res); };

//修改个人基本信息
export const saveBasicUser = params => { return post(`/api/hr/modPers/save`,params).then(res => res); };

//获取个人工作经历
export const getPWork = params => { return fetch(`/api/hr/workhis/getAll`, params).then(res => res); };

//修改个人工作经历
export const savePWork = params => { return post(`/api/hr/modWorkHi/save`,params).then(res => res); };

//获取个人教育经历
export const getPEdu = params => { return fetch(`/api/hr/educatTbl/getAll`, params).then(res => res); };

//修改个人教育经历
export const savePEdu = params => { return post(`/api/hr/modEducat/save`,params).then(res => res); };

//获取个人培训经历
export const getPTrain = params => { return fetch(`/api/hr/trainTbl/getAll`, params).then(res => res); };

//修改个人培训经历
export const savePTra = params => { return post(`/api/hr/modTrain/save`,params).then(res => res); };

//获取个人资格证书
export const getPzcgl = params => { return fetch(`/api/hr/zcglTbl/getAll`, params).then(res => res); };

//修改个人资格证书
export const editpqual = params => { return post(`/api/hr/modZcgl/save`, params).then(res => res); };

//获取个人持股信息
export const getPChigu = params => { return fetch(`/api/hr/chiguT/getAll`, params).then(res => res); };

//获取个人语言能力
export const getPlan = params => { return fetch(`/api/hr/empLangTbl/getAll`, params).then(res => res); };

//修改个人语言能力
export const savePLan = params => { return post(`/api/hr/modEmpLang/save`, params).then(res => res); };

//获取个人计算机
export const getPpc= params => { return fetch(`/api/hr/itTechTbl/getAll`, params).then(res => res); };

//修改个人计算机
export const savePpc = params => { return post(`/api/hr/modItTech/save`, params).then(res => res); };

//获取个人奖惩
export const getPjc= params => { return fetch(`/api/hr/jcxxTbl/getAll`, params).then(res => res); };

//修改个人奖惩
export const savePjc = params => { return post(`/api/hr/modJcxx/save`, params).then(res => res); };

//获取个人家庭
export const getPfam= params => { return fetch(`/api/hr/familyTbl/getAll`, params).then(res => res); };

//修改个人家庭
export const savePfam = params => { return post(`/api/hr/modFamily/save`, params).then(res => res); };
//获取持股情况
export const getChigu = params => { return fetch(`/api/hr/hireChigu/getAll`, params).then(res => res); };

//修改持股情况
export const saveChigu = params => { return post(`/api/hr/hireChigu/save`, params).then(res => res); };
//删除持股情况
export const delChigu = params => { return post(`/api/hr/hireChigu/del`, params).then(res => res); };

//获取个人紧急
export const getPtech= params => { return fetch(`/api/hr/tactPerTbl/getOne`, params).then(res => res); };

//修改个人紧急
export const savePtack = params => { return post(`/api/hr/modTactPer/save`, params).then(res => res); };

//获取个人银行
export const getPbnk= params => { return fetch(`/api/hr/pyeBankacct/getOne`, params).then(res => res); };

//修改个人银行
export const savePbnk = params => { return post(`/api/hr/modBankacct/save`, params).then(res => res); };

//获取个人社保
export const getPsoc= params => { return fetch(`/api/hr/socialTbl/getAll`, params).then(res => res); };

//修改个人社保
export const savePsoc = params => { return post(`/api/hr/modSocial/save`, params).then(res => res); };

//获取入职材料信息
export const getMaterial= params => { return fetch(`/api/hr/hireFileVw/getAll`, params).then(res => res); };

//获取待办事项数目
export const getTdListNum = () => { return fetch(`/api/hr/process/getTODONums`).then(res => res); };

//获取证明开具
export const getProve= params => { return fetch(`/api/hr/wfCerHdr/getOne`, params).then(res => res); };

//查询入公司后工作经历
export const getEmpAfter= params => { return fetch(`/api/hr/workhis/getNowWorkHis`, params).then(res => res); };

//我的申请撤单
export const cancelOrder = params => { return post(`/api/hr/process/apply`, params).then(res => res); };

//获取入职信息材料
export const getHirCai = params => { return fetch(`/api/hr/hireFile/getAll`, params).then(res => res); };

//上传文件删除
export const delHirCai = params => { return post(`/api/hr/hireFile/del`, params).then(res => res); };

//获取用户id
export const getEplid = params => { return fetch(`/api/hr/common/getUser`, params).then(res => res); };

//查看入职头像
export const gethead = params => { return fetch(`/api/hr/hirePhoto/getOne`, params).then(res => res); };

//上传入职头像
export const savehead = params => { return post(`/api/hr/hirePhoto/upload`, params).then(res => res); };

// 招聘录用审批
export const getRecruitmentInfo = params => { return fetch(`/api/hr/wfDrftHdr/getDrftInfo`, params).then(res => res); };

// 招聘录用审批提交
export const getRecruitmentApproveDrft = params => { return post(`/api/hr/wfDrftHdr/approveDrft`, params).then(res => res); };

// 招聘需求审批
export const getRecruitmentNeedsInfo = params => { return fetch(`/api/hr/wfRecHdr/getRecInfo`, params).then(res => res); };

// 招聘需求审批提交
export const getRecruitmentNeedsApproveRec = params => { return post(`/api/hr/wfRecHdr/approveRec`, params).then(res => res); };

// 薪酬信息
export const getPyComp = params => { return fetch(`/api/hr/personalData/getPyComp`, params).then(res => res); };

// 工资单获取验证码
export const sendMsg = params => { return post(`/api/hr/common/sendMsg`, params).then(res => res); };

// 工资单数据获取
export const getPaySlip = params => { return fetch(`/api/hr/personalData/getPaySlip`, params).then(res => res); };

// 验证验证码
export const checkCode = params => { return post(`/api/hr/common/checkCode`, params).then(res => res); };

export const loginPayroll = params => {return post(`/api/hr/personalData/loginPayroll`, params).then(res => res); };

// 休假申请
export const vacationSavePrc = params => { return jsonpost(`/api/hr/wflavehdr/savePrc`, params).then(res => res); };

// 薪资发放审批
export const getPayInfo = params => { return fetch(`/api/hr/wfPayHdr/getPayInfo`, params).then(res => res); };

// 休假类型获取
export const getLeaveType = params => { return fetch(`/api/hr/wflavehdr/getLeaveType`, params).then(res => res); };
//异动原因
export const getXfrReasons = params => { return fetch(`/api/hr/wfXfrHdr/xfrReasons`, params).then(res => res); };
//是否显示剩余年假
export const getLeaveLeftShow = params => { return fetch(`/api/hr/wflavehdr/getLeaveLeftValid`, params).then(res => res); };

// 休假剩余时间获取
export const getLeaveBalInfo = params => { return fetch(`/api/hr/personalData/getLeaveBalInfo`, params).then(res => res); };

// 销假申请
export const vacationsaveSel = params => { return post(`/api/hr/wfselhdr/saveSel`, params).then(res => res); };

// 休假数据获取
export const getWfLaveHdr = params => { return fetch(`/api/hr/wflavehdr/getWfPlaveHdr`, params).then(res => res); };
//用流程编号查询已完成的请假流程
export const getSavedPlave = params => { return fetch(`/api/hr/wflavehdr/getSavedOne`, params).then(res => res); };
//查询已完成的请假流程列表
export const getSavedList = params => { return fetch(`/api/hr/wflavehdr/getSavedList`, params).then(res => res); };

// 销假数据获取
export const getWfSelHdr = params => { return fetch(`/api/hr/wfselhdr/getWfSelHdr`, params).then(res => res); };
// 新的销假数据获取
export const getWfCleaHdr = params => {return fetch(`/api/hr/wfcleaHdr/getWfCleaHdr`, params).then(res => res); };
// 提交销假数据
export const saveWfCleaHdr = params => {return jsonpost(`/api/hr/wfcleaHdr/saveClea`, params).then(res => res); };

// 薪酬岗位变动
export const getAsaInfo = params => { return fetch(`/api/hr/wfAsaHdr/getAsaInfo`, params).then(res => res); };

// 社保公积金缴纳
export const getPhfInfo = params => { return fetch(`/api/hr/wfPhfHdr/getPhfInfo`, params).then(res => res); };

// 外出申请
export const saveOut = params => { return jsonpost(`/api/hr/wfouthdr/saveOut`, params).then(res => res); };

// 外出数据获取
export const getWfOutHdr = params => { return fetch(`/api/hr/wfouthdr/getWfOutHdr`, params).then(res => res); };

// 加班申请
export const saveOvrt = params => { return jsonpost(`/api/hr/wfwkothdr/saveOvrt`, params).then(res => res); };

// 加班数据获取
export const getWfOvrtHdr = params => { return fetch(`/api/hr/wfwkothdr/getWfWkotHdr`, params).then(res => res); };

// 删除图片
export const delWfFile = params => { return post(`/api/hr/process/delWfFile`, params).then(res => res); };

// 获取补卡异常信息
export const getabsents = params => { return fetch(`/api/hr/wfCrdHdr/getabsents`, params).then(res => res); };

// 补卡申请
export const saveWfCrd = params => { return post(`/api/hr/wfCrdHdr/saveWfCrd`, params).then(res => res); };

// 补卡数据获取
export const getCrdInfo = params => { return fetch(`/api/hr/wfCrdHdr/getCrdInfo`, params).then(res => res); };

// 获取考勤日历数据
export const getCalendar = params => { return fetch(`/api/hr/daily/getCalendar`, params).then(res => res); };

// 获取考勤具体数据
export const getCalendarDetail = params => { return fetch(`/api/hr/daily/detail`, params).then(res => res); };

// 获取测评list数据
export const getEvaluationList = params => { return fetch(`/api/hr/assess/persons`, params).then(res => res); };

// 获取测评问题
export const getExamInfo = params => { return fetch(`/api/hr/assess/getExamInfo`, params).then(res => res); };

// 查询评测表
export const getSheetList = params => { return fetch(`/api/hr/assess/sheetList`, params).then(res => res); };

// 获取评测结果数据
export const getEvaluationResult = params => { return fetch(`/api/hr/assess/result`, params).then(res => res); };

// 测评答案提交
export const saveScore = params => { return post(`/api/hr/assess/saveScore`, params).then(res => res); };

// 绩效计划列表
export const getPerformancePlanList = params => { return fetch(`/api/hr/plan/persons`, params).then(res => res); };

// 绩效计划数据
export const getPerformancePlan = params => { return fetch(`/api/hr/plan/performance`, params).then(res => res); };

// 绩效计划审批人员
export const getPerformancePlanMap = params => { return fetch(`/api/hr/plan/planMap`, params).then(res => res); };

// 绩效审批
export const planApprove = params => { return post(`/api/hr/plan/planApprove`, params).then(res => res); };

// 绩效详情数据
export const planApproveItemDetail = params => { return fetch(`/api/hr/plan/itemDetail`, params).then(res => res); };

// 绩效评估详情数据
export const perassessApproveItemDetail = params => { return fetch(`/api/hr/perassess/itemDetail`, params).then(res => res); };

// 保存绩效评估内容
export const perassessApproveSaveassess = params => { return post(`/api/hr/perassess/saveassess`, params).then(res => res); };

// 绩效评估新增查询
export const perassessApproveAddFields = params => { return fetch(`/api/hr/perassess/fields`, params).then(res => res); };

// 绩效评估新增保存
export const perassessApproveSaveitem = params => { return post(`/api/hr/perassess/saveitem`, params).then(res => res); };

// 绩效评估删除
export const perassessApproveDelitem = params => { return post(`/api/hr/perassess/delitem`, params).then(res => res); };

// 绩效评估计算
export const perassessApproveCalcpoint = params => { return post(`/api/hr/perassess/calcpoint`, params).then(res => res); };

//  绩效评估保存/提交
export const perassessApproveSavepoint = params => { return post(`/api/hr/perassess/savepoint`, params).then(res => res); };

// 绩效结果列表
export const getPerresultapproveList = params => { return fetch(`/api/hr/perresultapprove/persons`, params).then(res => res); };

// 绩效结果数据获取
export const getPerresultapproveInfo = params => { return fetch(`/api/hr/perresultapprove/getHdrInfo`, params).then(res => res); };

// 绩效结果调整系数获取
export const getPerresultapproveRate = params => { return fetch(`/api/hr/perresultapprove/getRate`, params).then(res => res); };

// 绩效结果保存
export const perresultapproveSaveResult = params => { return post(`/api/hr/perresultapprove/saveResult`, params).then(res => res); };

// 绩效结果提交
export const perresultapproveCommitResult = params => { return post(`/api/hr/perresultapprove/commitResult`, params).then(res => res); };

// 绩效结果
export const getPerresultList = params => { return fetch(`/api/hr/perresult/list`, params).then(res => res); };

// 绩效申诉
export const getPerresultApelInfo = params => { return fetch(`/api/hr/perresult/getApelInfo`, params).then(res => res); };

// 绩效申诉
export const saveApelInfo = params => { return post(`/api/hr/perresult/saveApelInfo`, params).then(res => res); };

// 绩效申诉审批数据获取
export const perresultGetWfApelInfo = params => { return fetch(`/api/hr/perresult/getWfApelInfo`, params).then(res => res); };

// 绩效申诉审批提交
export const perresultApproveApel = params => { return post(`/api/hr/perresult/approveApel`, params).then(res => res); };

// 绩效面谈数据获取
export const perresultGetIntrvwInfo = params => { return fetch(`/api/hr/perresult/getIntrvwInfo`, params).then(res => res); };

// 绩效面谈数据提交
export const perresultSaveIntrvwTbl = params => { return post(`/api/hr/perresult/saveIntrvwTbl`, params).then(res => res); };

// 绩效面谈流程图
export const perresultIntrvwPlanMap = params => { return fetch(`/api/hr/perresult/intrvwPlanMap`, params).then(res => res); };
// 绩效面谈审批提交/保存
export const perresultApproveIntrvw = params => { return post(`/api/hr/perresult/approveIntrvw`, params).then(res => res); };
//获取请休假天数
export const calLeaveTime = params =>  { return jsonpost(`/api/hr/wflavehdr/calcLeaveDays`, params).then(res => res); };
//获取已申请和申请中的产检假总数
export const calApplyPregnantTime = params =>  { return jsonpost(`/api/hr/wflavehdr/calcApplyPregnantDays`, params).then(res => res); };
//获取预备会信息
export const getYbhInfo = params =>  { return fetch(`/api/hr/wfouthdr/getYbh`, params).then(res => res); };
//获取分权信息
export const getFqyyInfo = params =>  { return fetch(`/api/hr/fqyy`, params).then(res => res); };
//提交分权信息
export const saveFqyyInfo = params =>  { return jsonpost(`/api/hr/fqyy`, params).then(res => res); };
